package com.gxgeek.javabasic.ClassLoader;

/**
 * @author gaoxing
 * @create 2018-06-07 下午8:00
 */
public class SingletonTest {

    public static String text = "初始化";
    private static class Singleton {

        private static final Singleton INSTANCE = new Singleton();

        {
            System.out.println("单例初始化");
        }
    }

    public static final Singleton getInstance() {

        return Singleton.INSTANCE;
    }
}
